You have an error in your SQL syntax; check the manual that corresponds to your MariaDB server version for the right syntax to use near ':%20Custo%20Group%20Business%20Type:%20Manufaturer#%' AND p_show_siamsh...' at line 3select count(*) as count_p from product where cat_id LIKE '%#irle%20bending%20big%20tubing%20pipe%202'%20tube%20%20Company%20Name:%20Custo%20Group%20Business%20Type:%20Manufaturer#%' AND p_show_siamshop='yes' and p_pause = '' and p_stop = 0